home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / getpty.z / getpty
Text File  |  1998-10-20  |  4KB  |  67 lines

  1.  
  2.  
  3.  
  4. GGGGEEEETTTTPPPPTTTTYYYY((((3333))))                                                            GGGGEEEETTTTPPPPTTTTYYYY((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _getpty, mkpts - get a PTY or Pseudo-TTY
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssttttaaaatttt....hhhh>>>>
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<uuuunnnniiiissssttttdddd....hhhh>>>>
  15.      ####iiiinnnncccclllluuuuddddeeee <<<<ffffccccnnnnttttllll....hhhh>>>>
  16.  
  17.      cccchhhhaaaarrrr ****____ggggeeeettttppppttttyyyy((((iiiinnnntttt ****ffffiiiillllddddeeeessss,,,, iiiinnnntttt ooooffffllllaaaagggg,,,, mmmmooooddddeeee____tttt mmmmooooddddeeee,,,,
  18.                     iiiinnnntttt nnnnooooffffoooorrrrkkkk))));;;;
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      This function finds and allocates a pair of devices making a pseudo-TTY,
  22.      described in _p_t_y(7M).
  23.  
  24.      If ffffiiiilllleeeeddddeeeessss is not null, then the file descriptor for the master or
  25.      controlling side of the pty is stored through the pointer.  If
  26.      successful, a pointer to an internal, static area containing the name of
  27.      the slave device node is returned.  The file descriptor is opened with
  28.      the value ooooffffllllaaaagggg, constructed as described in _o_p_e_n(2).
  29.  
  30.      The access bits of the slave device node are set to mmmmooooddddeeee.  The owner of
  31.      the slave device is set to the real UID of the caller, and the GID is
  32.      reset.
  33.  
  34.      If nnnnooooffffoooorrrrkkkk is 0 and the process does not have effective UID 0, then this
  35.      function may execute /usr/sbin/mmmmkkkkppppttttssss to change the owner and permissions
  36.      of the node for the slave device.
  37.  
  38.      The slave device file in /_d_e_v will be created if it does not already
  39.      exist.
  40.  
  41.      This function may also use the facilities described in _g_e_t_g_r_e_n_t(3C) to
  42.      set the group of the slave device node.
  43.  
  44. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  45.      chmod(2), chown(2), getgrent(3C), open(2), pty(7M), tty(1), tty(7)
  46.  
  47. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  48.      A returned value of 0 indicates failure, with _e_r_r_n_o indicating the nature
  49.      of the problem.
  50.  
  51. BBBBUUUUGGGGSSSS
  52.      When __g_e_t_p_t_y(3) uses /usr/sbin/mmmmkkkkppppttttssss, it waits for it to finish with
  53.      _w_a_i_t_p_i_d(2).  This requires that the caller not have set SSSSIIIIGGGGCCCCLLLLDDDD to
  54.      SSSSIIIIGGGG____IIIIGGGGNNNN.  Instead, __g_e_t_p_t_y(3) should save and restore the signal handler.
  55.      See wait(2) and signal(2).  The nnnnooooffffoooorrrrkkkk argument can used to avoid
  56.      undesirable forks.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.